from fromework.config.settings import SCREENSHOT_SAVE_DIR
import datetime
import os


class NameGenerator:
    @staticmethod
    def generator_screenshot_name(start_with: str = SCREENSHOT_SAVE_DIR, end_with: str = '.png') -> str:
        if not start_with.endswith('/'):
            start_with += '/'
        if not os.path.exists(start_with):
            os.mkdir(start_with)
        file_name = datetime.datetime.now().__str__().replace(' ', '-').replace('.', '-').replace(':', '-')
        return start_with + file_name + end_with
